build: use pkg-config(1) for probing gtk versions

You can still force gtk2/gtk3 by using make ... UI=gtk2 or UI=gtk3
respectively.