Fix Windows related build issues