"The new consensus in the intelligence research in the 21st century [shows] that men on average are slightly (but significantly) more intelligent than women, by about 3-5 IQ points" (Kanazawa) but the reason is not because of their gender; it is because of their height.
Research has shown that taller people are generally more intelligent than shorter people, and it just so happens that on average, men are taller than women.
Referring back to the girl vs. boys debate: until puberty, girls are on average always more mature than boys at any given chronological age, so comparing boys and girls, for example at age 5, is like comparing boys at age 5 to 7-year-old girls because the girls are more mature and thus have a greater cognitive capacity.
Height being the big factor for one gender being more intelligent than the other can also be seen when comparing boys and girls before puberty: when girls are taller than boys, and also happen to be more intelligent than them.
Graphs from the National Child Development Study (NCDS) in the United Kingdom, charting the mean IQ of the NCDS respondents by sex before puberty at age 7 (left) and after puberty at age 16 (right).
Due to girls' faster rate of maturity, they are more intelligent than boys until puberty, but the male advantage in intelligence emerges when boys are fully mature and become taller than girls.
All in all, the true reason behind why girls are smarter than boys is that "the sex difference in rate of maturity masks and drowns the sex difference in general intelligence" (Kanazawa).
Kanazawa, Satoshi. "Girls Are More Intelligent Than Boys, But Men Are More Intelligent Than Women." Psychology Today. Sussex Directories, Inc., 3 Oct. 2010. Web. 1 Nov. 2010.