Short answer:
If you launch a program from a shortcut that has compatibility mode properties set you should still be able to pin.
Long answer:
Generally you can only pin programs to the taskbar that the taskbar knows how to relaunch. If the taskbar can determine which shortcut matches the process that owns a window that shortcut is what gets pinned. If it can only find the executable then it creates a shortcut to that executable and pins that shortcut. If it can't find any way to relaunch then it won't give the option to pin.
What process/shortcut are you trying to pin?