Silence some -Wsign-compare warnings.

strpos can likely just be made an int here.