Fix TLS specific test failures && handle IO#wait for Ruby 1.9.3