Change function called to decode base64 strings to keep iOS 6 compatbility, return error if base64 decoding fails