Kraft Foods has booked an increase in first-half profits, despite recording a fall in sales, thanks to productivity and price gains.