Fixed compile errors on Windows