Fixing IF in cmake file for older cmake versions.