[#33962] Use a proxy function to close modals.

Because otherwise, we will always be stuck with SqueezeBox/Mootools.

Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33962&start=0
I don't know much about it. it's not really related to this PR but I don't mind fixing it here if you want me to.