[LIBREPORT PATCH rebase] add helper function for GLib initialization