fix IE8 support by changing splice to slice. Fixes #1883