Mary Barra appointed as General Motors chief