Added -fPIC option for building shared library.