Modified to be more robust and based on common Subject lookup mechanisms (SecurityUtils). If not found there, only then fall back to a system property (previous behavior).