Fixes emscripten build.

It still doesn't draw in WebGL yet.
Fixes javascript output.

It now plays in the web.