Another attempt at getting shared lib flag right