Unexpected identifier means somewhere a variable is not declared. Is there anything on the anonymous homepage, which the anonymous does not have read rights to? Do you use a javascript which might cause this?
Double check if the anonymous user role is allowed to read all the data on the anonymous user role homepage. Because if anonymous is not allowed to read it the object is not there and thus an object is empty where you probably thought it would always be there.
Regards,
Ronald