proplib: merge patch from git master to use fdatasync(3) if available.