How social context impacts the emergence of leadership structures