Fix compatibility with older glib versions