PepsiCo reported better-than-expected revenue in the third quarter despite weaker demand for its snacks and drinks in North America