Emscripten

I think the emscripten stuff is more or less ready to merged, any comments, @mortenvp, @petya2164?