Dodgers agree to contract extension with 2-time All-Star