Update select2.js

above function doesn't work great
Merge pull request #1887 from lukinpark/patch-1

Update select2.js