Static output feedback of equivariant linear systems with applications to the control of interconnected agents