TiVo turns in a profit as sales rise