fix build issue on MSVC12 (porting from qaac)