Small fix for Darwin

Found a magic flag that fixes the problem with -fvisibility=hidden on MacOS.