Rebasing your change on top of latest

Made crazy small change to make it compile, the work looks great.

The pull request looks messy, but it's because I'm rebasing on top of origin/master. I could make this pull request directly to jenkinsci if that's easier. I kept your original commit in there, with your name on it.