Fix compatibility with older versions of libgtk

The original rewrite targeted 3.10, but we'll try to support 3.4
(maybe earlier).

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>