Update for CMake policies 0022 and 0023 (0023 needs revisiting when we
can depend on 2.8.12).