fix compile errors on windows