Spin-glass behavior in Pr0.7Ca0.3CoO3 and Nd0.7Ca0.3CoO3