Fix variable definition in wrong scope

File "/usr/lib/python2.7/dist-packages/salt/states/pkg.py", line 702
UnboundLocalError: local variable 'modified_hold' referenced before assignment