add more legacy functions: setlinebuf and setbuffer