Fixed some recent problems with the mingw cross compile.