Update code to work with newer versions of Emscripten.