IE bugfix: const to var declaration change

const declaration is not supported by major IE versions