Fix warning when casting gpointer to gboolean