Cowboys snap losing streak with 19-14 win at Carolina