Fix mingw build