Work around jruby/jruby#1716

https://github.com/jruby/jruby/issues/1716
Use IO::WaitReadable instead of JRuby's SSLErrorWaitReadable

It's the same thing, but the code is portable.