Fixed a build error with mingw