change to allow compilation using emscripten