Fixed a Visual C++ 10 bug regarding declaration of templates