Brazil-based food group Marfrig has swung to a net loss in the first six months of the year.