On the direct determination of analytical diatomic potential energy functions from spectroscopic data: the X 1∑+ electronic states of NaF, LiI, CS, and SiS