mesa: fix error handling for glIsEnabled