Fix for <= IE8

Fix for an error caused in IE8 and lower by the unsupported method "filter" for arrays.