migrate detect_gtk