glib2: add missing Regexp.escape
glib2: make environment name customizable

It is useful for not PATH environment variable such as GI_TYPELIB_PATH
that is GObjectIntrospection's .typelib search path.