Use fs.watch() when available

Adds compatibility with more recent versions of Node.js