Theory of mind: evolutionary history of a cognitive specialization