Add automatic shader type discovery
Improvements to GLSLProgram.