Workround memory corruption by EGL library