fix mingw build issues
fix msvc build again