I just had an argument about this on another message board.
The third-person plural pronoun is sometimes used with a singular meaning when you don't know if the antecedent is male or female. (The "antecedent" is the thing the pronoun refers to; in your first sentence it's "anybody", in your second sentence it's "the author".)
This is one technique used for avoiding the so-called "generic he". In the past, it was common to use "he" or "him" if you didn't know whether the person was male or female, but this is now considered by many to be politically incorrect.
The problem with using "they" or "them" is that it breaks the rules of grammar. It's not so bad when the antecedent is a word like "anyone" or "someone" or "nobody", so your first sentence sounds OK to many people. However, most people -- including most language experts -- would find your second sentence to be unnatural or even unacceptable. However, since the sentence continues to describe the author as a man, there's no need to avoid the "generic he" -- the author is a man, and we know that.
This use of they/them has been recorded since the 14th century, and was quite common in the 19th; however, it was replaced by the "generic he". That's why many people will complain about this new, modern use of they/them, even though it's actually very old.
Other techniques of avoiding the generic he include:
writing "he or she" (but that sounds clumsy)
writing "he/she" or "(s)he" (but how do you pronounce it?)
using the plural instead (but that's not always possible)
The last technique is the most elegant. Instead of saying, for example, "Every pupil must do his/her/their homework", you can say, "All pupils must do their homework", and everyone is happy. (Except the pupils, of course.)
But this is not always possible, for example: "We are looking for a new Sales Manager. ?????? must be flexible, hard-working..." This may be one reason so many adverts for jobs are written in the second person: "You are flexible, hard-working..."