Fixed CMake policy handling.