G7 commits to 'rules-based trading system' despite tensions with US