Don't use GLib 2.22 or later features

Those functions are introduced since 2.22:

  * g_ptr_array_set_free_func()
  * g_ptr_array_unref()