Question: My title sums up my question pretty well. We're investigating whether we can use a Kanban-based system to manage and track some internal projects and one of our requirements is to track time spent on activities. This will allow us to collect stats on engineering cost. 

Is anyone doing this and if so, how?

Answer: 
My advice is to use whatever time tracking system you currently have rather than add unnecessary bells/whistles to Kanban because:

* It will cost you less in terms of time, effort, training and dollars.
* It will avoid giving people one less thing to complain about when you implement Kanban, so acceptance of this change will be easier.
* It will avoid trying to graft on bells/whistles onto Kanban that at the end of the day may not work as well as your current system.

If you don't have a time tracking system already in place then I suggest that you get a good one that your accounting and HR teams can work with rather than try to graft something onto Kanban boards. The fact that you're asking if this can be done says to me that it isn't obvious that it can be done which means you should think twice about whether or not it should be done.
I agree, that in general Kanban is not about tracking time spent on tasks. However, I understand a need for that. It seems to me that you need a virtual Kanban board with build-in time tracking and reports. The solution that offers such a powerful combination is [Kanban Tool](http://kanbantool.com/time-tracking).