Make NeedRestart::Kernel more independant from the UI frontend.