Fix build_prefix on osx (swing 2)

There was a recent fix (#768) for issue #707 that fixed the brew
install use case, but not the virtualenv use case.  This commit
consolidates the logic.  This was discovered when testing wheel
generation using qwcode's wheel_install branch.

Testing performed (simplejson, numpy 1.7):

 - osx lion (using virtualenv)
 - osx lion (installed via root)
 - ubuntu lucid (using virtualenv)
 - ubuntu lucid (installed via root)

Reference:
 - https://github.com/pypa/pip/issues/707
 - https://github.com/pypa/pip/pull/768