Fixes to make things work more cleanly on Debian