Compile fixes to build on Ubuntu 13.04