Install glog and update gcc on Ubuntu 12.04

hhvm requires at least gcc 4.7 and glog installed