Malaga have confirmed the signing of Paris Saint-Germain defender Diego Lugano on loan until the end of the season.