ming32 build fixes