fix C bindings for emscripten