Make shared library instead of module.

Fixes library loading on Mac OSX JVMs