apply patch for compatibility with glib >= 2.42