Problem with global external dependency

I'm trying to use global external dependency via external option.
I got two problem:

1) modules declared as external could not be found by node_resolve, and it throws an exception. I solved this adding `exports.getNodePathExternal ` in pathUtils.js. This solve my problem, but I doubt that could be by accident (I think an external module should not be  passed to node_resolve at all, but I was not able to find a way)

2) ast generated for global external module was rendered as

```javascript
function (module, exports) {
     return __external_modulename;
},
```

while the correct code is:

```javascript
function (module, exports) {
     module.exports = __external_modulename;
},
```

But please confirm that this change doesn't break amd external...