Fixing compilation issues with ubuntu 14.04 and gcc4.7