IE8 JS fixes. Closes #18.