Ensure compilation to Javascript with Emscripten
Merge pull request #1907 from severin-lemaignan:emscripten-2.4