Hybrid exchange-correlation functional determined from thermochemical data and ab initio potentials