fdatasync() is not defined on some FreeBSD and Darwin systems.