preparation for browserify of ttyrec