mingw32 fixes

mingw32 fixes