Linking errors when crosscompiling tests