Fixed building with cygwin
Note that building with cygwin gcc results in a DLL that depends on cygwin1.dll