What about using a web service like Device Atlas?

Yes it costs, but totally negates the problem of user-agent updates and claims to be 99% accurate.

Kev