use _setmode instead of _set_fmode in windows
use _setmode instead of _set_fmode in windows

now compiles with MinGW-w64

dirkx/OpenSC.tokend,OpenSC/OpenSC,0x7678/myOpenSC,dirkx/OpenSC.tokend,Jakuje/OpenSC,metsma/OpenSC,hhonkanen/OpenSC,martinpaljak/OpenSC,l1k/OpenSC,philipWendland/OpenSC,Jakuje/OpenSC,viktorTarasov/OpenSC-SM,rickyepoderi/OpenSC,velter/OpenSC,OpenSC/OpenSC,tidatida/OpenSC,0x7678/myOpenSC,tidatida/OpenSC,LudovicRousseau/OpenSC,financeX/OpenSC,germanblanco/OpenSC,marschap/pkg-opensc,jpki/OpenSC,germanblanco/OpenSC,philipWendland/OpenSC,mtrojnar/OpenSC,mouse07410/OpenSC,marschap/pkg-opensc,martinpaljak/OpenSC,rickyepoderi/OpenSC,Jakuje/OpenSC,LudovicRousseau/OpenSC,velter/OpenSC,AktivCo/OpenSC,financeX/OpenSC,mouse07410/OpenSC,marschap/pkg-opensc,nmav/OpenSC,mouse07410/OpenSC,dirkx/OpenSC.tokend,aobaid/OpenSC,viktorTarasov/OpenSC-SM,Jakuje/OpenSC,frankmorgner/OpenSC,0x7678/myOpenSC,frankmorgner/OpenSC,LudovicRousseau/OpenSC,dengert/OpenSC,hongquan/OpenSC-main,financeX/OpenSC,OpenSC/OpenSC,UIKit0/OpenSC,UIKit0/OpenSC,adminmt/OpenSC,dengert/OpenSC,kasparsd/opensc-latvia-id,0x7678/myOpenSC,jpki/OpenSC,financeX/OpenSC,carlhoerberg/OpenSC,hhonkanen/OpenSC,l1k/OpenSC,hongquan/OpenSC-main,hongquan/OpenSC-main,nmav/OpenSC,financeX/OpenSC,carlhoerberg/OpenSC,aobaid/OpenSC,carlhoerberg/OpenSC,0x7678/myOpenSC,viktorTarasov/OpenSC-SM,UIKit0/OpenSC,fabled/OpenSC,AktivCo/OpenSC,kasparsd/opensc-latvia-id,ieugen/OpenSC,fabled/OpenSC,CardContact/OpenSC,dirkx/OpenSC.tokend,metsma/OpenSC,carlhoerberg/OpenSC,dirkx/OpenSC,adminmt/OpenSC,dirkx/OpenSC.tokend,UIKit0/OpenSC,nmav/OpenSC,kasparsd/opensc-latvia-id,velter/OpenSC,philipWendland/OpenSC,carlhoerberg/OpenSC,gemini/OpenSC,fabled/OpenSC,0x7678/OpenSC,frankmorgner/OpenSC,germanblanco/OpenSC,dirkx/OpenSC,l1k/OpenSC,ieugen/OpenSC,0x7678/OpenSC,dirkx/OpenSC,velter/OpenSC,mtrojnar/OpenSC,ieugen/OpenSC,kasparsd/opensc-latvia-id,gemini/OpenSC,jpki/OpenSC,AktivCo/OpenSC,ieugen/OpenSC,dirkx/OpenSC,0x7678/OpenSC,fabled/OpenSC,gemini/OpenSC,dirkx/OpenSC.tokend,martinpaljak/OpenSC,aobaid/OpenSC,mtrojnar/OpenSC,adminmt/OpenSC,adminmt/OpenSC,hhonkanen/OpenSC,0x7678/OpenSC,rickyepoderi/OpenSC,dirkx/OpenSC,aobaid/OpenSC,ieugen/OpenSC,tidatida/OpenSC,CardContact/OpenSC,frankmorgner/OpenSC,marschap/pkg-opensc,dengert/OpenSC,tidatida/OpenSC,metsma/OpenSC,CardContact/OpenSC