Coating a support with a magnetic layer by vapour deposition