Fix CMake warning

Summary: Latest CMake on OS X with brew surfaced this warning and that
this check was not doing what it was originally intended to do.