additional fix for IE8 which doesn't support Array.indexOf