The values being set are the defaults. Change the values before loading zgdbm plugin.
zstyle ":plugin:zgdbm" cppflags "-I/usr/local/include" # Additional include directory
zstyle ":plugin:zgdbm" cflags "-Wall -O2 -g" # Additional CFLAGS
zstyle ":plugin:zgdbm" ldflags "-L/usr/local/lib" # Additional library directory