Effect of aspect ratio on the magnetic properties of nickel nanowires