[gnome-base/gdm] backport logind runtime detection patch from 3.8, for 3.6