Fix some problems caused by newer versions of Emscripten.