Fix windows builds

Fix all windows builds, closes PR #8255