Make migrate script compatible with glib < 2.40