On model selection consistency of regularized M-estimators