make chosen work with elements not attached to dom

fix for https://github.com/harvesthq/chosen/issues/358