After upgrading to MacOS Mojave, Messages no longer allows me to sign in to Jabber / Google Talk. Previously, if the Jabber account was offline, it offered a dropdown to sign back in.
Now, that dropdown appears to be gone.
You can't. Apple removed the option to log in to Jabber with 10.14, Messages is iMessage-only now.
I see this has been already answered, but I'd like to chip in and recommend an alternative messenger: https://adium.im/
Adium is a free and open source multiprotocol messenger for all operating systems(including Mac OS).
I have attempted to move all the frameworks over from High Sierra. I successfully got the messages application from High Sierra to open on Mojave and it was able to send and receive messages. But I was unable to add a Jabber account due to an error connecting. I think this might require another framework or something else, but it probably works with the System Preferences account setup plane so changing it may cause other problems. I will look more into.
So as the others answers says I don't think its possible.
For those wondering I copied over the following Frameworks