A few little emscripten bugfixes