Surprised no one has mentioned how men consistently outperform women at spacial ability tests. Perhaps that would explain why there are more male hackers. Or is that just too logical ;)
On the other hand, adding a few explicit lessons on mental 3d rotation at the start of some university's chemistry (organic? - I can't remember) significantly narrowed a male/female performance gap.
eg http://www.medicalnewstoday.com/articles/133575.php