Hydrogen as a probe for the average thickness of a grain boundary