Avoid calling a few deprecated gl functions when shaders are enabled.