mingw32 fixes