(Merged from 385635.) [MNG-2146] Added code to guard against NPE when maven.home and org.apache.maven.global-plugin-registry are both missing from the sysprops.