extended checks for C++11 support and use appropriate flags for compiler