Add C_DECLS to allow calling from c++

We have always defined these macros, but we never used them.