Bugfixes for compilation in Cygwin (WIN32 -> _WINDOWS)

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>