Fix building issues on Ubuntu 12.04.