Girls having better math grades could be explained by girls, on average, being higher in conscientiousness. I think generally grades in schools are more strongly correlated with diligence than natural talent.
Also, studies have shown that in more gender role laissez-faire societies there's actually a greater difference between genders, which your GDR study inadvertently corroborates.