Fix link time errors and enable-multiarch