Controlling semiconductor nanowire crystal structures via surface chemistry