Fixes for compile time errors on C++11

Most of the errors are implicit casting which are not allowed anymore.
While you're in there -- perhaps you could get rid of the c-style strings and put this together as a `std::stringstream` or something ...