Manchester United defender Raphael Varane will leave the club when his contract runs out at the end of the season.