Fix Travis CI build

Travis CI has an older version of GObject. g_type_init() is needed
in this older version but is depreciated in new ones. Therefore it
is added with a macro condition block.