Cleaner fix for JSON-like Gearfiles

This removes the need to wrap some Gearfiles in IIFEs, while keeping
backwards compatibility.