misc build fixes for windows
cleaner build configuration

This is mostly so that the dist builds on Windows.