Emscripten

I think the emscripten stuff is more or less ready to merged, any comments, @mortenvp, @petya2164? 
That ~~~ looks quite weird to me ;)