OS X is actually a descendant of Unix, having a strong influence from BSD (via something else Jobs did before rejoining Apple). Windows had implemented some POSIX compliance at one time. I'm not sure if it's still lurking in there, but it was back in XP. Being POSIX compliant, however, doesn't necessarily have to do with security.
Still, if windows is less secure than it should or could be, that makes other systems less "vulnerable" in comparison. Plus, the basic structure of the 'Nixes is more secure in general.