Fixed MSVC 2013 build errors and workaround for an internal compiler cra...

Just that: a few fixes to make OpenCV to compile nicely with the new Visual Studio 2013.