jruby support for synapse

back-ported from our chef mono-repo