Fixes for windows builds