Update index.js

Use the util library's inherits function
Merge pull request #1 from skeggse/patch-1

Update index.js