fix error when pickling frozen graphs

This fixes an error that I discovered when trying to pickle a frozen graph... (see https://github.com/networkx/networkx/issues/962)