Check if browser support closing popup.

Hi guys,

I am working on Contributor Widget and I had issues with Chrome on iOS. Issue was that on some browsers popup are not recognized so calling something like self.popup.close() will brake things. I made small fix and if you want you can merge it.