Fix javascript compatibility with IE

Change-Id: I9d486cd13a0581bb14d90fbeca98c86aee58ac8f