Are you sure that is what testosterone present in the womb means? I read some stuff that ties testosterone in the womb to the size of the placenta. Which is a different matter and not dependent on the sex of the baby.
High testosterone levels means bigger placenta and therefore bigger baby and therefore bigger brain. Bigger brain means smarter.
Women want to have as small placenta and baby as possible while men want it to be as big as possible. There's basically a war going on in the uterus. The man doesn't care about the woman.. only the baby. While the woman on the other hand cares more for her own life than the babies. Yes, I'm anthropomorphising our genome. I'm not talking about opinions here. The male sperm also tries to send mind controlling hormones to the woman to make her anxious and more careful, while the woman has functions to kill these hormones. Having babies is not a particularly beautiful or cooperative act seen from the cellular level.
I read a report not long ago linking high testosterone levels in the womb to autism. Basically, since big brains are favoured this mechanic is selected for so we get a situation where the selected genes have now hit a roof for how high it can go and still be useful. These are one of the proofs that we're still right in the middle of human evolution.
I'm pretty sure few people can agree on how to measure intelligence.