PeterVH:
Believe it or not: I observe exactly the opposite: your sketch runs fine on my windows 7 sp1 but it does not work on win xp pro sp 2!
Yes, that I do believe.
Microsoft added support for the special interface association descriptor Leonard uses, in XP SP3 and Vista SP1. The Leonardo bootloader does not use IAD, so XP SP2 can probably recognize Leonardo and upload code, but only when it's running the bootloader.
Windows XP SP2 (and Vista before SP1) can not recognize a USB composite device with Serial (CDC-ACM protocol) and Keyboard (or any other HID). Neither can Mac Leopard or Snow Leopard.
Actually, there are ugly hacks that allow these combinations to work on either system. In the early days of developing Teensy (before Apple released Snow Leopard, not to mention Lion, and XP SP3 was still pretty new) I put a lot of work into trying to find any combination that would work on both. I never found it, and all ways that worked on either violated the USB standards. Teensyduino implements an emulated serial channel when using Keyboard. Shortly after Apple released Lion, I added an option for Keyboard plus real Serial, which of course doesn't work on the older systems.
Leonardo was announced several months after Mac Lion was released, and XP SP3 was of course very well established. It's never really needed to support these older operating systems.