Fix Ubuntu 12.04 build issues.