LeBron James agrees to two-year contract extension with Lakers