Measurement of a vacuum-induced geometric phase