Moved check for __sync_add_and_fetch to configure script because the GCC...

..._HAVE_SYNC_COMPARE_AND_SWAP_* macros dont seem to be well supported.