This patch introduces a mitigation for KARAF-5526 which causes the
interactive Karaf shell to fail for some terminals. This patch can be
removed once we update Karaf again but it seems like Karaf 4.0.11 will
not be released and updating to a new major version is no bugfix.
Note that for a major Karaf update, we likely need to update our
assembly step anyway since they made somemodifications to their scripts
and assembly plugin meaning this is unlikely to stay in our code