Coherent x-ray magnetic imaging with 5 nm resolution