Fix build on mingw-w64