Debian build fixes

Hi,
I needed those changes for building the Debian package and I think they would be useful in vanilla XBMC, too.