bugfix: String.prototype.endsWith isn't implemented in some browsers