Geometric means of structured matrices