Compiling for c++11, fixed some deprecation warning.