Medium effects on the protonation of carboxylic acids at different temperatures