fix cmake warning about CMP0042 on Mac