Build fixes

These changes fix building wayland egl backend with debugging enabled and the runtime link error with logging functions due to C++ symbol mangling.