Improve compatibility with Android

Android uses an older version (<1.4) of Apache commons by default.
This version do not provide the method encodeBase64String().
Instead encodeBase64 can be used and converted in a String.

See http://stackoverflow.com/questions/2047706/apache-commons-codec-with-android-could-not-find-method