point composer to php5.3 compatible versions, plus some syntax fixes for 5.3 compatibility
Merge pull request #1309 from rossriley/upload-fixes

Some fixes for compatibility with PHP 5.3 which was neglected in the original PR