[CMake] Set policy CMP0051 to OLD globally.