[Java] Fixed link error on library loading on Mac.

Summary:
Fixed link error on library loading on Mac.

Test Plan:
make rocksdbjava
make jtest