Malaga have recruited Morocco striker Mounir El Hamdaoui on loan from Fiorentina until the end of the season.