use grunt 0.4.x
fix spelling for typeof comparison
prevent access to node.js code block if browserify is being used