[build] Rework the buildver dep check.