Fix static linkage