Add support for global pointers in river memory model