ES 1.2.1 compatibility

Hi, I want to try the filter but am running es 1.2.1 so while I was there I updated to code to the new(er) version. This should basically be the only necessary change for the 1.x version I guess.