Added support for building with Wayland.

See NO_X11 define in BUILDING.