Basic changes needed to compile on emscripten