Fix mingw compilation problems.