X11 headers and libraries are only required if we're actually using X11 which may not be the case. This allows to build wxGTK on the systems using Wayland-only GTK.