Fix mingw mode