add C++11 nullptr support detection
Switch to c-based tolower rather than c++ to avoid confusing Visual Studio references #287