cmake: Use common available calls to check __sync_* API
cmake: Use common available calls to check __sync_* API

Cray supports only __sync_val_compare_and_swap(), but not the
__sync_bool_compare_and_swap().

saprykin/plib,saprykin/plibsys,saprykin/plib,saprykin/plibsys,saprykin/plibsys