updates to successfully compile with latest emscripten