Adaptations to build in windows

re #6175