G8 has deal on “substantial” emissions cuts-Merkel