On the origins of body size dimorphism in primates