Support for MINGW/CYGWIN in build script