Heineken has reported a strong rise in half-year profits as cost controls across its business offset weak beer sales in Europe and North America.