Added require.defined() to replicate require.js

I use the (undocumented) RequireJS `require.defined()` function in my web app to dynamically check if the current view has any code to run.  For example, I have AMD modules that are named like `views/foo`, and my app.js checks to see if `views/foo` exists.  If so, it calls `.init()` on that module.

For example:
```
if (require.defined('views/' + viewName)) {
    require('views/' + viewName).init();
}
```

The `require.defined()` function isn't exposed in the almond wrapper, just `require._defined` (a map of views).

This PR adds a simple `require.defined()` function to match requirejs's.