Bond-length fluctuations and the spin-state transition inLCoO3(L=La,Pr, and Nd)