Almost get static linking working