Women are more likely to apply for senior roles if they offer flexible hours, a study suggests.