Fix DOM element removal in order to be compatible with IE8

According to javascript documentation it seems that the element.remove() method does not exist
Merge pull request #937 from jfacchini/fix-collections-js-ie8

Fix DOM element removal in order to be compatible with IE8