Fixes compilation errors on cygwin