j: Fix building libj.so
Merge pull request #5288 from mstarzyk/j

j: Fix building libj.so