Use g_object_unref also for Gtk+2
GDK_KEY_* was introduced in Gtk+ 2.22
Bump minimum required version for Gtk+2 (2.24) and Glib (2.36)