Update index.js

Make page.js requireable by node without jsdom.