more MSVC fixes from emscripten