Source: Aaron Cook, Red Sox agree to deal