Fix could not resolve xref for figure node with :name: option
Merged in tk0miya/sphinx (pull request #264)

Fix could not resolve xref for figure node with :name: option