As a work around until this gets fixed in vagrant, hhvm or where ever the root cause exisits you can download the composer installer using wget:
sudo wget https://getcomposer.org/installer
Then install composer using hhvm with some options to extend the timeouts as recommended here.
hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 installer
Then install composer globally as usual and clean up :
sudo mv composer.phar /usr/local/bin/composer
sudo rm installer