compile as C too

With these changes, the project and header files
can be compiled as C as well, tested with gcc 4.8
and clang 3.3. I also tested with clang++ again to
see if it still cleanly compiles as C++ codem which
it does.