egl: fix error handling in _eglCreateSync