Fix EJSON base64 decoding when 'A' is 3rd or 4th char in a block.

Fixes #1001.