some fixes to allow new version of tor to build correctly