QCD phase diagram in a constant magnetic background