Merge pull request #22 from sezero/master

further cmake updates/fixes and fix getopt_long()