Functoriality of the Chern-Weil Homomorphism under Extension of Structure Group