Fixed some Windows calling convention issues.