Implement the emscripten runtime same way as in the OCaml implementation.
Implement the emscripten runtime same way as in the OCaml implementation.