Update lib/monitor.js

Fix accidental global.