Added `extern "C"' to headers.
Added some missing consts.