Fix for build issues on windows, Fixes #574