Highlighting is done by MPLAB for a version of basic other than pbp.
Just because it doesn't highlight doesn't mean anything.

Since both WAIT and WAITSTR work fine in HSEROUT, you will need to post your code that does not compile.