add in C++11 support and pedantic fix