Consume \n in mg_fgets when reading from membuf.