make namespace.js work for functions

I was working with a library that exposed an object, which apparently was actually a function. Since [functions are objects in JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function), I had no idea and was really confused until I realized that `grunt.util.namespace` wasn't working. This minor commit fixes that.