3M to cut 400 headquarters jobs