cmake: check for policies properly

Instead of hard-coding the version, check for the policy directly. If
anyone is using a 2.8.11 pre-release version (though this would be…odd),
let it work for them as well.