mingw build fixups