Remove MACROS directory property It did not always contain all macros. We have `if(COMMAND)` now instead. Add policy CMP0217 for compatibility. Fixes: #27765