Fix build on mingw.