You are using a php command line version that does not understand namespaces: 5.2.17. Composer can only run with PHP 5.3 and up.
Note that that version you run on the command line need not have anything to do with the PHP you are using in the web server itself. It usually is a different executable with it's own configuration.