added require/global shim

This will make lectric work with RequireJS and other AMD/CommonJS module loaders. If no module loader is present it will fall back to window.Lectric just like before.