Spectroscopic study of lanthanide squarate hydrates