Fixing build issues under windows