Discussions on G20 leaders’ declaration went on till last minute, EU official says