Various fixes for gitian builds