Shared variables in VHDL -2008 are required to be protected types accessed by methods. Your shared variables won't work in -2008, also shared variables as protected types introduced in -2000 are not supported for synthesis. It would seem you should be using compatibility modes for an earlier version of VHDL (-1993).
See IEEE Standard VHDL Language Reference Manual, Amendment 1: Procedural Language Application Interface, IEEE Std 1076c-2007 for the introduction of PLI support in the VHDL standard, folded into the IEEE Std 1076-2008 revision.