Fixes to cg2glsl.
Fix GLSL regression.