Fix windows build for mingw