Changes to make it work on Cygwin.