prevent concurrent GL-calls

This can be caused by garbage collector when it finalizes ImageGL and SurfaceGL objects