Switch from obsolete extend.js to Object.create