Fixed OOO V4.x documents not building Table of contents correctly

This has been tested successfully with
odt documents from LibreOffice 3.6.6.2 and LibreOffice 4.0.4