Ensure compilation to Javascript with Emscripten
ts: catch & append general exceptions into log
Merge pull request #1890 from alalek:ts_fix_seh_exceptions_handling
Merge pull request #1904 from severin-lemaignan:emscripten