Detecting magnetic resonance through quantum jumps of single molecules