Fix AMD loading

Component produces invalid standalone AMD builds if the main export is a function. This commit fixes this by wrapping the export in a function which is always the desired value that requirejs for example expects.