Tyson Foods has struck a deal to sell its operations in Mexico and Brazil to meat processing rival JBS.