Canada has joined a multibillion-dollar European Union defence fund, becoming the first non-European country to do so, as Ottawa looks to diversify its military spending away from the United States.