Changed code as described in this discution: https://github.com/euske/pdfminer/issues/82#issuecomment-64300119