Fix build with GTK < 2.22 and GLIB < 2.32.

Add these back-compat to gtkcompat.h until the actual GTK version we want to depend on is figured out.

Based on SF #1047, and fixes that.