Getting buggy stuff like gbm before it's ready is the price you pay running mesa from git.The bug only occurs with drm platform. With x11 everything should work fine.
A workaround would be
a) Setting EGL_PLATFORM=x11
b) Don't build drm platform, so that x11 is chosen by default.
(--with-egl-platforms=x11 instead of --with-egl-platforms=drm,x11)