Fix javascript closure memory leak when opening select2