fix(build): fixes for Win32

1. Use standard int64_t
2. lambda does not deduce return type in VC10
3. sprintf_s > snprintf
4. workaround std::array iterator protection
5. size_t is not long enough to trigger of_length test