Fix link issue and add shared to .so