fixes static build with mingw