Fix Rake task to build shared library and relocaate