Fix jQuery UI 0.11.1 autocomplete compatibility. (fixes #170)

This should be compatible with older versions as well as with 0.11.1.