Add C++ guards
Merge pull request #22 from hadleyrich/master

Add C++ guards