In abstract Chosen, make sure reference to jQuery-only variable is
set before acting on it.

Fixes #1165
Merge pull request #1168 from harvesthq/fix-for-1165

Fix issue when using both jQuery & Prototype