Better solution proposed here: https://github.com/jonlong/fbopen-widget/blob/open-search/javascripts/widget.js#L206-L211