Proposed fix for JENKINS-17667

There appears to be some unthreadsafe initialization going on here.
Initialize/get inside a synchronized block for threadsaftey.

jira issue: https://issues.jenkins-ci.org/browse/JENKINS-17667