Changes to build on debian

Debian test as of 18/9/2014.