Metallicity of the massive protoplanets around HR 8799 If formed by gravitational instability