Using Object.extend for String.prototype extensions