Fixed some warnings and errors when using clang++