We found this to be an issue with having additional admin domain aliases. We had some old ones in there and after removing them it started. We think this maybe a bug but have yet to confirm that. The JS variable it produces when having multiple, a single one (the main one) works ok.
Go to Sites -> [your site] -> Domain Aliases -> Administration and remove all of the entries. As long as the domain you are using is set on the General tab it should work.