Substrate effect on the optical response of thin palladium films exposed to hydrogen gas