This part is only for determining the actual OS that runs vim. I would not define osx related globals g:slimv_iterm and g:slimv_path2as.
Rather I'd put these lines in SlimvSwankCommand() this way:

        elseif g:slimv_osx
            let result = system('osascript -e "exists application \"iterm\""')
            if result[:-2] == 'true'
                let path2as = globpath( &runtimepath, 'ftplugin/**/iterm.applescript')
                return '!' . path2as . ' ' . cmd
            else
                return '!osascript -e "tell application \"Terminal\" to do script \"' . cmd . '\""'
            endif
        elseif $STY != ''

Unfortunately I don't have access to osx so I can't test it. Could you please modify your pull request accordingly?