Republic of Ireland striker Robbie Keane has agreed to a multi-year contract extension to stay with the LA Galaxy.