Changed Base64 code to be 1.7 compatible