while I don't have ressources registry knowledge, I have nonetheless a suggestion.
Could you in your failed install:
-
copy less.js from a 5.08 install under Products.CMFPlone/static/components/less/dist
-
edit variables.plone.less in the copied theme, search for 'mobile', then add the missing separations characters in the first found line and the 2 following, save the file
and try to compile again ?