Renormalization group invariants in the MSSM and its extensions