Cmake: set CMP0005 policy. Move policy setting to the beginning.