Added UMD wrapper and fixes iOS issues.

Added UMD wrapper and fixes the iOS issues where the menu won't open.
Apologies for changing the indentation :)