egl/haiku: handle memory allocation failure