Food and oil prices must not undermine commitment to Africa, G8 told