Use feature detection
Fix git version check