Fixes find functionality recursion (bugzilla FF bug 960409)

Fixes FF bug 960409 (https://bugzilla.mozilla.org/show_bug.cgi?id=960409) by changing nextPageMatch from a recursive function to an iterative function.