epub: modify the toc processing to use the new state-based parser