Non-empirical calculation of X-ray magnetic circular dichroism in lanthanide compounds.