Fix issue with new versions of Node

I'm not sure which version of Node broke this, but this fix certainly works for v0.10 onwards.

Fixes #3