avoid VC++ 2013 compiler crash; fix linker problem