Make kmos.run compatible with older python