refactor nativecallglobal

It will just return a pointer, that we can cast later to the desired type.