Fix for older versions of bash and hosttag detection