Added some constant modifier and casting for C++ compliant.
Merge pull request #11 from tokuhirom/cplusplus

Added some constant modifier and casting for C++ compliant.