Ensure globals are flagg in JShint and fix errors (Fixes #586). Fix ie6 plugin error