Fix template specialization problem that caused link errors in Visual Studio 2010