Fixing calling convention for PInvokes.