better interpretation of the hifi light intensity and fixes for compilation on mac