split out fdatasync - not available everywhere