Make sds compile with C++ compiler

These two commits make sds compile with a C++ compiler.  There are still warnings about `long long` and `buf[]`.  However, I think that most compilers support those C99 features, only causing warnings.