beget object utility function based on Object.create()