Fix build on mingw64