[JENKINS-14529] JMX compatibility for --daemon

Fixes [JENKINS-14529](https://issues.jenkins-ci.org/browse/JENKINS-14529) when included in Jenkins.