The only workaround I can think of would be to allow the user to manually maintain a list mapping character names to classes.
As for why the function isn't available -- I doubt it is the result of a deliberate policy decision. Unfortunately the Lua API has never been officially supported, so we have to wait for one of the devs to get in the mood to spend his free time on it. You could make the feature request on the
official forum, but don't hold your breath waiting for a response.
Edit: See also
Garan's reply.