Improved GTK+3 compatibility