Add G_SOURCE_FUNC cast macro which suppresses -Wcast-function-type
This is the workaround suggested by https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-function-type
This warning is not enabled by default during the GLib build, but applications may want to opt into it.