Fix building on mingw32