emscripten: Restore compatibility with existing emsdk releases. (cherry picked from commit 5008521538ffe7931ecd0d11c4a5e75a05f54b5b)