Make compilable on Cygwin

Once patched for Cygwin, but the recent commit d27b15a2cafda33b4c7f4133828e1b743d2fbeeb doesn't compile.

This patch fixes this regression.

Note: On Cygwin, unlike MinGW, POSIX API is preferred to that of Windows.