Fixed typo in checking macro
Fixes for gcc versions and working on linux
Fix for mac compatability issue
Fix for mac clang c++11