Here's a jsbin that combines the Stack Overflow answer with the code you provided in the original message.
Note that you need to use the full version of Select2 and you need to use the original `matcher` option while wrapping your old matching function with the `oldMatcher` call.
Select2 should only fail to initialize if either no instances are found or if there was an error during initialization. So make sure that your selector actually matches the elements you are looking for, and set `debug: true` during initialization if you get any JS errors.