Use $GLOBALS for globals

Follow up: I10f071253e48e6492949ebbc3c07964c747e885f

Change-Id: Iabcba276de1031041b2d458679b4ebca1931c129