Hi Mark,
If you don't mind, I want to help with the solution too.
Look, I am very happy you pay attention to my words.
If I understood right you will take admin_url() and will strip out "https" from the beginning.
I feel if you help me this way you may create problems in other wordfence installations.
Look at my case
admin url
https://site1379293681.websiteseguro.com/Site/wordpress/wp-admin
site url
http://www2.asbacsalvador.com.br/
not valid
http://site1379293681.websiteseguro.com
http://site1379293681.websiteseguro.com/Site
http://site1379293681.websiteseguro.com/Site/wordpress
Let me know if I understood wrongly.
Regards,
Miguel