RKRV potential energy curves and dissociation energies of NH and PH