some hacks to get emscripten to work