Tom Brady agrees to 2-year extension