Global shares inch higher, on track for monthly gain despite AI, Iran jitters