G20 pledges to do ‘whatever it takes’ to support global economy