Auto-detect version