remove snprintf declaration from toc.c

I also added _CRT_SECURE_NO_WARNINGS, since it was also recently added to
other files in master, so I don't forget to do that when merging into
master.