adds AMD and CommonJS export support