Mexican tortilla maker Gruma swung into profit during the second quarter due to an improvement in operating income and lower financing costs.