Dollar index gains 2.26% in June as safe-haven demand lifts greenback