Add support for __sync_val_compare_and_swap builtin