Fix building waylandservertest when Qt was built without GLib support
In that case we will get a linker error due to QEventDispatcherGlib missing. I am not sure if QEventDispatcherUNIX() would work in all cases, so I've added preprocessor directives to prefer the GLib one if it is available.