Fix the CMake build when setting MACOSX_DEPLOYMENT_TARGET

If we don't reset CMAKE_OSX_DEPLOYMENT_TARGET, it will end up in
CFLAGS together with the -mmacosx-version-min that we set,
and the compiler errors about the conflict.