Fixes to allow release-1.0 to build under Ubuntu 9.04.

This commit contains fixes to allow the release-1.0 branch to build under Ubuntu 9.04 x86-64.

I have not tested the build on other platforms. It's quite possible that this breaks the build on other platforms. It therefore seems a bad idea to approve this change at code-review time unless you can convince yourself the other platforms will be fine.

But even if it doesn't get approved, it is still worth uploading for the benefit of others who wish to get release-1.0 to build under Ubuntu 9.04.

This is the final of three commits in different packages.