The excess acidity of aqueous HCl and HBr media. An improved method for the calculation of X-functions and H0 scales