fixed long standing bug in Windows where Pascal calling convention was mistakenly used instead of C convention