use new cglobal sub exposed by NativeCall