In this patch all I did was create an options object and used it in both the HTTP and HTTPS constructors. After that the examples work again.
Fixed "Invalid argument to getAgent" when proxying HTTP
Merged pull request #39 from timmattison/master.
Looks like this may fix the issue that I reported