register/enqueue the gallery admin js where the customizer can read it too.
The widget area in the customizer is wrapped differently