fix freebsd support

O_DSYNC is not a thing on FreeBSD (and, I believe, other BSDs)