add support for GTK3

Note that this change does not include the necessary changes to the build system to add a --with-gtk option because I'd rather leave that up to someone who knows what they do.