Support both gtk3 and gtk2.