This is just another version of the he/she, him/her dilemma: English lacks singular pronouns that include both genders. I like @drm65's approach to avoiding the problem. The other likely option is to specify both:
"himself or herself"
It is unbelievable how a perpetrator will cast himself or herself in the role of victim.
Or:
"him or herself"
It is unbelievable how a perpetrator will cast him or herself in the role of victim.
Update:
Another approach is to just choose a verb that isn't reflexive:
It is unbelievable how a perpetrator will play the role of victim.
That's not always possible or best, e.g. when you're trying to emphasize exactly that reflexive aspect of the issue. But play is obviously shorter and simpler than cast him or herself in the role of, so it's worth considering unless there's a good reason to use the wordier version.
Update 2:
This question and my original answer are nearly 9 years old now, and there have been some significant changes with respect to personal pronouns in the interim. There's a greater awareness now of gender neutral and non-binary pronouns. In some contexts, a phrase like him or herself that's meant to be inclusive (compared to just himself) might be insensitive. Themself seems to be gaining acceptance even if it's not yet widely used. As the obvious singular form of the commonly used themselves, themself seems like a good choice for being inclusive while still being fairly conventional.
There are a number of other gender neutral third person reflexive pronouns such as hirself, zirself, xyrself, and coself. If you're talking about a specific person and know which pronouns they favor, use them.
Perhaps by 2029 there will be a more clear-cut answer.
As others have suggested, himself or herself or him- or herself are possible and acceptable; I feel that him or herself is also fine, and perhaps even better.
Although, indeed, him(-) or herself looks like illegitimately cutting up a word, this is how I think most people would say it in speech. Speech is normally leading in such cases, unless this gives you clearly unacceptable results.
As to the hyphen, English normally only uses hyphens where they are necessary to avoid ambiguity, as in compound adjectives. This means that many style books will recommend that you hyphenate an ill-advised proposal, but not this proposal is ill advised, since the latter is not at all ambiguous.
However, some style books will choose to hyphenate even is ill advised, for the sake of consistency; there is something to be said for that. But in general, hyphenation is not extremely strict, and it often comes down to common sense. (Notice the contrast with other European languages, such as Dutch, where the hyphen would be mandatory in hem- of haarzelf and with all noun adjectives, such as noun adjective. I believe the same applies to German. I don't think this construction is even possible in French.)
In the case of two compound words where part of the first one is omitted in ellipsis, as in him(-) or herself, I would only add the hyphen if it were required to avoid ambiguity, which is not the case in this example. Hyphens slightly disrupt the flow of reading. I believe Fowler agrees with me here in his Modern English Usage. So I would simply write it as the New York Times does:
No student, of any background, should be expected at the outset to recognize him or herself in it.
You could also use themselves and change the subject to students, use themselves with a singular antecedent, or use only himself—but let's not rake up that discussion.
Best Answer
Her is correct here, and not herself:
Use a reflexive pronoun where the subject of the verb is also the object.
In this case, the subject is Private Joan Smith's actions, and they are reflecting credit on to Private Joan Smith. Thus the subject of reflects is not the object (great credit) nor even the indirect object (Joan Smith), and the pronoun should not be reflexive.