Influence of the synthesis parameters on the crystallization and magnetic properties of cobalt nanowires