Use function with immutable proto instead of mutating __proto__