add exports for AMD and global
fix export for AMD