Fix install with shared libs on weird systems