various small changes to make a clean unix build