win: more mingw32 fixes, cross and native

mingw32 (not mingw64) is a bit crippled.
Various fixes