making BUILD_TESTS an explicit option
adding support to clang
bugfix to conform to clang's implementations of the standards