As G-WAN scripts are compiled and linked independently, 'global' variables are 'static' (to each script) rather than available for all scripts.
So, you have to attach the KV store to a persistent pointer. G-WAN offers persistent pointers with different scopes:
US_REQUEST_DATA = 200, // Request-wide pointer
US_HANDLER_DATA, // Listener-wide pointer
US_VHOST_DATA, // Virtual-Host-wide pointer
US_SERVER_DATA, // global pointer (for maintenance script)
There are several G-WAN script examples demonstrating how to do that:
http://gwan.ch/source/persistence.c http://gwan.ch/source/stream1.c http://gwan.ch/source/forum.c etc.