Autotools, fix static linking