Move version/revision check after globals are set