Gender differences in STEM academic career paths