Fixes #7859 - puppetssh run works on Ruby 1.9+

This replaces Petr's patch: https://github.com/theforeman/smart-proxy/pull/163

Please test this on 1.8.7 as well