Thermodynamic and diffusion studies on solid (Li,Mg) and (Li,Cd) alloys