Canadian PM Carney says 'middle powers' can still shape the world