libreplace: add fdatasync() if not available