Global gluing and G-flux