Fix deprecation warning on X11