Don’t blame women for leaving fields like engineering. Blame bad attitudes.