Move workaround for emscripten from include/exception to library.js.