python fixes for unix build