Wrap CommonJS module in IIFE and create global variable for browser