workaround: refer to the global gl_renderer when destroying surfaces.

This supposed to be a short term workaround to fix the issue when
surfaces are destroyed.

We should find a solution that does not modify gl-renderer.