Forward port jar-with-dependencies fix

The repackaging of protobufs was broken in the jar-with-dependencies.
This was fixed in the 1.4.4 branch and this forward ports it.