Fixes for cygwin