Patrice Evra has confirmed he has retired from football at the age of 38.