The Role of Task-Related Behavior in the Emergence of Leaders