Fixed shader bugs for GLSL < 2.0