Modifications to compile on Debian Wheezy & PG 9.1