fix for "variable length array folded to constant array as an extension" error
Added support for automake 1.13 & 1.14
Created DETECT_CLANG autoconf function, and excluded '-pthread' from CFLAGS when GCC is clang