First, we need to be precise in our language, since this has gotten us into trouble before. It’s not what he “is thinking”, but what he logically could think.
Second, while he could assume he is brown, the relevant assumption to complete the modus tollens is that he is ‘not blue’. That is different from being brown. Being brown is one way to be ‘not blue’, but it is reasoning on the possibility of being ‘not blue’ that ultimately allows him to conclude that he’s blue.
Finally, he’s able to contemplate and reason on these assumptions because they are logically permitted. There are a million logical deductions he could make, most of which aren’t relevant to the solution of the problem, but which the givens state that every person on the island knows immediately; everything that is logically deducible. He doesn’t know his eye color, so he knows that he could be blue, not-blue, brown, not-brown, red, etc. Making a deduction that includes his being any of these does not contradict anything he knows. And he makes them all. One of those deductions is "if I am not blue, then those blues see 98 blues, and they might think, "If I am not blue, then those blues see 97 blues and they might think, "If I am not blue then those blues see 96 blues and they might think, “…” " " "