#931: karaf terminal should support old and new console api, so it works in newer and older karaf versions.