How did the republic of liberia begin?