fix for javascript assignment cross-browser