glib2: reduce locking on object conversion