Added more debugging for failed realloc()s

Added ifdefs to support more versions of PCSC in debug mode