Update index.js

Use the util library's inherits function