fix loading of less imports on win, linux and mac

maybe the `if` should be more sophisticated, but this fixes #7513 tested on both win & linux ... need to test on mac too to be 100% sure