moved GFunc cast to macro GFUNC_COMPAT_CAST