MINGW32 related fixes