Is there is "Running in terminal session" lie shim?

I don't believe this is possible. The particular flag code that your program is probably looking at is the SM_REMOTESESSION flag. As SQLChicken pointed out, you can defeat this for a single user, by trying to grab the console session, which will leave you with SM_REMOTESESSION = 0, but for multiple users, I don't think it can't be done.

I appreciate this is frustrating, but you will probably have to work with program vendor to resolve this. It's a lot of work correcting software that misbehaves under TS, since it's usually caused by the crappy Windows mentality that all computers are just large screen PDAs and multiple users are out of the question (and networking is really for advanced users). Problems caused by this are not limited to the "Can't be bothered to test" function you describe (something like this:

#include <windows.h>
#pragma comment(lib, "user32.lib")

BOOL IsRemoteSession(void)
{
   return GetSystemMetrics( SM_REMOTESESSION );
}

) but also the use of shared resources and the proper use of graphics (the reason this is actually hard to do right is discussed by Raymond Chen).

So unless you have some other mechanism to prove that the software works correctly with multiple users, I would be inclined to assume that defeating the SM_REMOTESESSION check would not actually be enough.