esp32: mac build: use gstat if exists