Add support for Emscripten to the compiler.

This is mainly hacks for static linking - also has the output reformatting and an ifdef change from spcomp.

@dvander