Morphological transitions from dendrites to nanowires in the electroless deposition of silver