Updating library for usage with newer node versions 

Hello,

I've updated the lib so that it can be used with newer node versions (>=0.4.0). The changes are minor, but necessary in order to support both http and https with the new http.request and https.request node APIs.

Let me know if something seems strange!
Cheers