Adding compatibility for ubuntu 12.04 and centos 6.5