Mingw fixes

Replaces https://github.com/manderson26/dep-selector/pull/5