Fix CheckGlError when it is disabled