Allow non-global define in AMD detection

RequireJS' r.js builder can be used with almond to wrap all modules in
an IIFE, with define in the closure rather than on the global object.
This adds support for this case.
Merge pull request #61 from Bwrrp/non-global-define

Allow non-global define in AMD detection