Fix problem with Ruby 1.8.7 Net:HTTP

...where Net::HTTP socket would be closed even when nil. This occurs on Ubuntu 10.04LTS which has a maximum patchlevel of 249.