Add out_len parameter to base64_encode/base64_decode

This allows data with null characters to be decoded correctly.