fix multiple building issues under Microsoft Visual C++ 2013.