Fix #4702, make setup work on windows
Merge pull request #4715 from mscherer/fix_4702

Fix #4702, make setup work on windows