Fix undefined variable error in _getAptCommand.