Build the rts as a shared lib correctly