fix calling convention on win64, mostly passing the numerical tests