added include guards, and made headers C++ compatible