Set compile messages options as class variable

Refs #18714. Same logic as options for makemessages commands.