fix issue triggered by change in jQuery.fn.closest() between jQuery 1.7 and 1.8