Added compatibility with Gtk+ 2.x