African governments should give fibre-optic cables greater protection from attacks, a Google executive has said.