Ravens agree to deal with ex-Patriots WR