Changes for upstream: EGL extension for Wayland window, safety checks, external android header set patch