Fix https://github.com/kripken/emscripten/issues/2258