Fixes #5209 - setting infinite timeouts

I found out that timeout behaviour differs across versions of ruby and rest-client. Using rest-client >= 1.6.5 should be safe with any version of ruby.