adaptations to get emscripten running fine