JSHint thinks SockJS is undefined because it cannot find it in your script; even if you have loaded it in through the browser! To fix this behaviour, add this to the JSHint config in your Gruntfile:
jshint: {
options: {
// all of your other options...
predef: ['SockJS']
},
files : ['path/to/main.js']
},