Do not check gl_lib() without OpenGL support

The gl_lib() function is not defined if we do not #USE_OPENGL,
as can be seen in osdsdl.h. Building with NO_OPENGL=1 then
breaks, unless we add this conditional #ifdef.

Signed-off-by: Tarnyko <tarnyko@tarnyko.net>