Initial fixes for Cygwin compilation