It is no great surprise. Very few dogs like being petted directly on the head (i.e. without working up to it via the body first). And actually, you shouldn't really do it (and especially never let a stranger do it).
The reason is simple enough. In canine terms, that's an aggressive/threatening/dominating gesture. Now, OK, with time, you can teach the dog that
coming from a human, it is not the gesture of dominance that he thinks it is, and that it *would* be if it came from another dog. But you can't expect him to magically know it

If you want him to understand that certain gestures from humans (such as hugging, arms over shoulders, petting on the head, direct eye contact, etc) which ARE threats when coming from fellow canines, are not meant as such when they come from people - well, you've got to teach it. If the dog is showing obvious discomfort, it's only reasonable to back off a bit and work back up to making those sorts of gestures in a way that he can clearly see is non-threatening. If you can do that, then eventually he'll learn that,
even if you go directly for the head, it's not the threat it would be from his own species.