On the least-squares determination of lattice dimensions: a modified singular value decomposition approach to ill-conditioned cases.