Added support for compiling with c++11