ecere/gfx: Fixes to build with Emscripten