Fix regression causing crashes when running without a window manager.