Changes needed to compile successfully on Ubuntu 12.04.2