Fix build in Gruntfile, make sails.io client smarter when it is used by node