expose sub to fetch C globals

This will partial resolv issue #11.