glsl: be more careful about counting varying vars in the linker