Fix on MSVC
Add base64 encode/decode and SHA1 hash function.