Added shadow stack guard when compiling with -debug.