Merge emscripten optimization