Switches -v tests with more compatible version

Testing to check if a variable is defined with tests like
`[ -v SACK_SHORTCUT ]` was added in bash 4.2. Replaced such tests
with tests of the following kind: `[ ! -z ${SACK_SHORTCUT+x} ]`,
which work in older versions of bash as well.

Details of how this syntax works:
http://stackoverflow.com/a/13864829/3347227