Fix static linking