Retrieving magma composition from TIR spectra: implications for terrestrial planets investigations