fix global context types (cgo type conversions) and glib connect callbacks