Fix install bug which prevented --static working.