Some mingw compile fixes.