Fix build with mingw