green caves emscripten: fix/workaround some issues