Danone's shares climbed despite the French food giant reporting lower half-year margins as the company's sales beat analyst forecasts.