Introduce UserAgentReader class

- UserAgentReader encapsulates the various UserAgent checks in the code
- also enable code to run in Visual Studio 2010