Fix warnings; revert to c++11