patches for Cygwin support