Gender differences in the lifecycle benefits of compulsory schooling policies