build fixes for windows