Detect if require object available on root

We are using a non RequireJS build system that uses the `exports` variable. Backbone.LocalStorage looks for exports, but then assumes require is available if it sees `exports`. This breaks our application. Instead do a more granular lookup to see if exports is available AND `require` is available on the root object.