tests: Conditionalize usage of GTK+ in tests_generictreemodel

This allows running make check without GTK+ installed.