minimal mingw32 compilation fixes