Don't use fdatasync on OSX

This function is not supported, so we just fall back to the (potentially
slower) fsync.