fix #29

- fix ubuntu support
- tested on ubuntu 14.04 and 12.04
- fix centos support
- tested on centos 6.5
can we address that later?