test: fix compiler warning

.../test/test_lua_classes.cpp:337:5: warning: ‘ptr’
may be used uninitialized in this function [-Wmaybe-uninitialized]

http://my.cdash.org/viewBuildError.php?type=1&buildid=478692
Fix FTBFS for clang with newer (≥ 1.53.0) boost versions

When clang is combined together with libstdc++, boost fails to detect
the libstdc++ version correctly and disables some C++11 options (see
https://svn.boost.org/trac/boost/ticket/7473 )

This change works around this issue by trying to detect this problem.