Changes in the electronic structure of gold particles upon thiol adsorption as a function of the mean particle size