Refactor Rake::Trema::SharedLibraryTask.