Fix CMake warnings regarding policies CMP0037 and CMP0046

See cmake --help-policy CMP0037 and cmake --help-policy CMP0046 for full details