Fix errors/warnings when compiling with -std=c++11

These are compatibility changes only.