Only use fdatasync() on Linux

This function is not universally available, and since we don't have our
own autoconf script to check for it, just assume that we have it iff
we're on Linux.