Error check base64 encoding

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Correctly size buffer for base64 encoding

The API of the new base64 implementation from PolarSSL was being used
incorrectly in get_encoded_user_passwd().  The function malloced a zero
byte buffer and tried to base64 encode into that buffer.  Base64
encoding was skipped.  Before the base64_encode() was error checked by
the previous commit, random memory from the heap was sent as the HTTP
basic authorisation token.  Naturally this resulted in unauthorised
errors when updating your IP address with your DDNS supplier.

Fix by using base64_encode() to return the required buffer size to be
malloced.

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Merge pull request #40 from mfleetwo/base64encode

Fix for all updates failing to DDNS service provides when using inadyn 1.99.3

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>