Contact induced magnetism in carbon nanotubes