1. supporting ubuntu 12.04
2. fixing compiling error in gcc
3. cmake support