moved exports check and renamed var to prevent parsing errors in browser