There is no and has never been a commitment to spend 2% of GNP. Both Harper and Trudeau told the NATO bureaucracy they could set whatever aspirational goal it wished but we'd spend what we needed to. 

But thinks for bringing up UN payments which since they are supposed to pay for peace (i.e. defence) should count towards our defence spending. The military says that "whole of government" i.e. soft power is a big part of security so it's quite reasonable to count all expenditures towards reducing the likelihood of conflict as "defence spending". Ditto for foreign aid.