fixed building problems for tests, but cannot build them in c++11 yet