patching a bit for compilation on cygwin