I have seen this problem approached in several ways by different teams.
1) Technical debt items (like refactoring) are added to the product backlog as stories, with the user type as 'developer', and business value expressed as direct costs or ROI.
This has the advantage of making the technical debt items (and their business value/reason for existence) visible to everyone, including the customer. It also makes the velocity including necessary technical work be accounted for and visible.
However, they may be too technical for everyone to understand and may waste time for explaining and negotiating these items. The business value may not be apparent or explainable to everyone, especially those who are feature-focused.
2) Reserve one 'special' sprint for technical debt issues.
These are tracked on a technical backlog that is completely separate from the product backlog. This eliminates the need for the team to make the case for them, to push for technical debt items to be added into a business-value based backlog, or for these issues to be forced into user story form.
Disadvantages: there are some in the community who are against any kind of special iteration. It also requires the customer (and everyone) to accept the productivity hit of a 'dark' iteration, in which no visible progress (and velocity) is made.
3) Roll up the time necessary for technical debt into the stories.
This allows the team to only commit to those items that can be completed without incurring technical debt. Story points and velocity will thus include things like refactoring.
The big disadvantage I see to this is that it implies that stories should be completed without technical debt...which seems to violate the principle of only doing enough to complete an item.