Adding compatibility for ubuntu 12.04 and centos 6.5

-w is not working for other distro than ubuntu/debian