Solve reentrant parsing issue in iOS 8

Commit 52fc4be had the right approach, but the reentrance avoidance code
was in the wrong place. It should have have been added when the
reentrant parser was created.

This commit fixes the reentrant issue, also fixes #26.
Merge pull request #34 from squarefrog/master

Solve reentrant parsing issue in iOS 8