patch to fix linker issues on Ubuntu build farm from cjwatson.

Patch from cjwatson, fixes compilation on the ubuntu build farm:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726429

I have no idea how to build this repository, so I'm afraid I can't properly test it but it is currently in use by the downstream Ubuntu repo's deb files so I'm guessing it's alright.