Fix GSource usage with recent GLib

https://bugzilla.gnome.org/show_bug.cgi?id=728157