add support for recent centos and ubuntu versions