refactor emscripten.h to avoid ugly function pointer type definitions in function definitions