Avoid a POSIX include on Windows.

This commit licensed as MIT/X11.
Merge pull request #908 from madewokherd/mingw-build

Avoid a POSIX include on Windows.