Cowboys Struggle in San Diego, but Pull Out Victory