Make it work with emscripten