Fixed some syntax and compilation issues, and added include file installation into
build system.

My C++ is obviously very rusty.