A multiple-scattering approach to the study of X-ray absorption spectra of anatase and rutile