France's Senate has voted to raise the age of retirement from 60 to 62 despite widespread opposition.