Make osdemos linking like other programs

Most of the programs list their dependencies on the Mesa libraries in
their Makefiles. This works with the default configuration where
APP_LIB_DEPS only lists external libraries. This changes the
linux-osmesa configs and the osdemos Makefile to follow that convention.

Some cleanup of the Makefile is also added to refer to the GL libraries
through the existing variables rather than hardcoding their names.
diff --git a/configs/linux-osmesa b/configs/linux-osmesa
index 163b145..504980b 100644
--- a/configs/linux-osmesa
+++ b/configs/linux-osmesa
@@ -25,4 +25,4 @@
 # Dependencies
 OSMESA_LIB_DEPS = -lm -lpthread
 GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
-APP_LIB_DEPS = -lOSMesa -lGLU
+APP_LIB_DEPS = -lm -lpthread