Ferrari extend Massa contract until end of 2013