Enable optimisations in the emscripten backend.

This requires a new DISABLE_UNSAFE_OPTS setting in emscripten, which
switches off some optimizations that seemed to be causing problems.