Update gpsd.js

Added check for this.device undefined.