Fix OSX build and cppcheck

Change-Id: Idfdc7b2f34a49b5bab89460a84946a467ec8be6e
Merge pull request #104 from tribal-tec/master

Fix OSX build and cppcheck