Markdown: handle undefined refs (Will Duquette)

Fixes issue #10