v1.8.2: fix "Uncaught ReferenceError: gallerySettings is not defined" error

This error was occurring with plugins (such as Simple Facebook Connect) that manually execute the_content filter, which means that the shortcode is parsed multiple times.