This fixes deprecation warnings when building for macOS >= 10.12 systems.
Additionally, using stdatomic.h (or the more modern __atomic_ builtins)
is required when targeting CHERI-enabled architectures such as
CHERI-RISC-V or Arm's Morello since the compiler rejects __sync_* atomic
for pointer types (they only work with integers).
Some systems build FreeType using CMake rather than autotools (such as Visual
Studio), which will give us CMake config files rather than pkg-config files, so
if we can't find FreeType using pkg-config, try again using CMake.
Please note that according to FreeType's docs/VERSIONS.TXT, the version we want
when checking with CMake is 2.8.1 or later.