A ground isn't needed for a GFCI to work property. It senses current on the neutral and trips.Just an FYI for anyone using a 12VDC to 120VAC inverter. They all have a 3 prong outlet (hot, neutral, ground) but the ground is not connected to a real ground. If you use one in damp conditions where you'd normally use a GFI circuit breaker for protection, a GFI cannot work and there is no GFI protection.
I came across this out of curiosity, used a GFI tester on the 120VAC output, knowing it was going to be used outside in potentially damp/wet conditions. GFI tester showed no ground circuit. Tried 2 other inverters, same thing. There is no "earth" grounding. The inverter frame is "grounded", but only to the negative pole of the battery.
That's why old two-prong (ungrounded) outlets must be swapped with GFCI outlets or breakers.