better glib detection (again)