Thermodynamic optimizations of the Nd-Sn and Sn-Tb systems