In v1 of this patch, there was the (small) possibility that 'g' might
have been garbage collected while we were in the C function.
Avoid this by passing 'g' to the function as well as the C pointer, so
that 'g' is pinned as a garbage collector root [by CAMLparam5] so it
cannot be collected while we're in the function.
Rich.