Making cmake_policy work for older cmake versions.