Patching ctools for modal window bug checking for truth value of jQuery object which always is true.