Added base 64 encoding for 10.7 and up