I haven't tested it with 0.5.19 yet. Unfortunately the mod is probably fairly version specific if they're going to keep changing the code the mod applies to.
Edit: Just downloaded 0.5.19, applied the mod, no unexpected errors seen. Ran game again, did a quickstart, starting slave got a random portrait as expected, and random portrait button works. Same with slaves at slave trader.
Will need more information to know what's going wrong for you. Are you starting a new game to test this? Are you applying any other mods? What errors show up on the console? (there's always some that aren't actually a problem, but some might indicate what's going wrong). You can run the game from a command prompt and then the errors persist after the game closes.