Fixes for getting emscripten to build