full support for either C++11 (or not) builds
rework pthread and openssl order
fix, add define for NO_CXX11 again
add _XOPEN_SOURCE and option to disable TR1
remove m4 prefix from ax_cxx_compile_stdcxx_11.m4