emscripten fixes for 1.5 (WIP)