Theory of white lines in the x-ray absorption spectra of lanthanide complexes