Fix compile error when building under mingw64