Fixes for Cygwin compilation and execution