Wouldn't it be simpler and more consistent to add the automatic uniforms at load time, i.e. with code in a self-executing function in ShaderProgram.js?  We would call `getAutomaticUniformDeclaration` to get the string to map a uniform to.