ci: enable leak checking on osx (cherry picked from commit b00672b9e404adb771601408d4b02711085d6f90)