Support cygwin, mingw32 and mingw64.