Wrap in a constructor and provide constructor via jQuery plugin API and AMD/CommonJS.