Perturbation calculation of molecular correlation energy using Gaussian-type geminals. Second-order pair energies of LiH and BH