Fixed build script to correctly configure tests.
Added improved macros for C++11 features that are not supported on all platforms.