Fixed compile errors on windows