Rewrite circular buffer using Object.defineProperies().