Updated to support Ubuntu 14.04 and gcc-4.8.