Support for RequireJS and as a standalone library.

Miniview currently only supports module loaders supporting CommonJS.
This excludes its use as a standalone library (attach to the global
space) or with AMD loaders such as RequireJS. This patch makes
`miniview` support all three approaches.