Fix many warnings with _CRT_SECURE_NO_WARNINGS.