Fix Windows compiler errors