US poultry producer Pilgrim's Pride has reported a rise in second-quarter profit on gains from lawsuit settlements.