Added the C++11 compiler flag and fixed a warning.