Joel Ward agrees contract extension