Pathway selection as a tool for crystal defect engineering : a case study with a functional coordination polymer