Fixes for getting emscripten to build

The changes to get emscripten working with Cap'n Proto are relatively small. The biggest change had to occur in exception.c++ because emscripten doesn't have __cxa_get_globals