fix deprecated g_type_init call

add conditional to g_type_init call to fix FTBFS on systems where
g_type_init is deprecated