cmake: correct version check