Added missing cmake macros plus minor fixes
Merge pull request #1 from LuaDist/master

pull from luadist