fix compiler warnings for clang/c++11