wayland/egl: Ensure correct buffer size when allocating