JS fixes for IE <= 8.