Merge pull request #21 from jemc/master

Problem: Other build systems need header fix from PR #20
Problem: Need doc generation and PR #15 has merge conflicts
Solution: Merge as a patch by hand (with a few tweaks)