Arduino Leonardo only uploads Short Programs

My Leonardo will stop accepting code a second after it has started. Short programs like Blink or AnalogInOutSerial will load fine, but anything longer or containing multiple parts like the example code for the PulseSensor will drop out before it finishes. I can watch the TXRX leds flashing then stop before the Arduino 1.0.5-r2 IDE has signaled that it has finished uploading the code.

It worked fine on my old system, Windows 8.1 64bit. But now I am at a different office and have tried using both OSX 10.5 and a fresh install of Windows 7 64bit with the same result. If the board is recognized at all by the OS, which I can accomplish by resetting it several times after plugging it in and getting lucky, I can upload code only if I hold down the reset button and release it once the IDE has signaled that it has begun uploading. Anything else will throw up errors, becomes an unrecognized device or the board will disappear from from the IDE and the OS.

Again the Leonardo worked just like a Duemilanove before on my Windows 8.1 system, but has stopped responding like one since I have made the switch. I am not sure what is causing the problem, it is very frustrating and I would appreciate any help.

Also if I cannot circumvent this problem would it be easier to use an Arduino Uno-R3, since seamless HID emulation is a requirement for my project and it still uses a dedicated USB communication chip?