(frontend) Add some workarounds for Emscripten