Throw exceptions correctly in strict mode.

following procedure @ http://kripken.github.io/emscripten/docs/contributing/contributing.html