fixed checks for old cmake versions