French dairy giant Danone has recorded a higher-than-expected rise in first-half operating profit but sales growth slowed down in the second quarter.