Fixed momo-commander for compiling on mac os x

- Library paths were incorrect on my macbook
- invalid string comparison, need to use strcmp in C/C++
- cleaned up some code
- needed extra include of stdlib on some platforms