Fix weird linking error when using clang