One hamfisted solution would be to require both men and women to take the same time off if they were to have children. That way one gender isn't seen as having a greater possibility of taking longer parental leaves.
Mandate that both parents must take at least some baseline time off from work. Say mandate at least three months. There will be people who take longer, and some who opt out of work altogether but this would eliminate the thought pregnancies get in the way of productivity for one gender and not the other.