lib/replace: add defines to let the callers find out if pwrite and pread are thread...