examples/gcoap: fix reference to variable out of scope
examples/gcoap: fix reference to variable out of scope

miri64/RIOT,jasonatran/RIOT,basilfx/RIOT,basilfx/RIOT,ant9000/RIOT,authmillenon/RIOT,ant9000/RIOT,RIOT-OS/RIOT,RIOT-OS/RIOT,ant9000/RIOT,kaspar030/RIOT,authmillenon/RIOT,authmillenon/RIOT,OTAkeys/RIOT,RIOT-OS/RIOT,kYc0o/RIOT,jasonatran/RIOT,RIOT-OS/RIOT,OlegHahm/RIOT,OlegHahm/RIOT,authmillenon/RIOT,OTAkeys/RIOT,OTAkeys/RIOT,OlegHahm/RIOT,kYc0o/RIOT,kaspar030/RIOT,jasonatran/RIOT,authmillenon/RIOT,miri64/RIOT,kaspar030/RIOT,OlegHahm/RIOT,ant9000/RIOT,miri64/RIOT,kaspar030/RIOT,RIOT-OS/RIOT,basilfx/RIOT,kaspar030/RIOT,kYc0o/RIOT,kYc0o/RIOT,authmillenon/RIOT,ant9000/RIOT,jasonatran/RIOT,OTAkeys/RIOT,miri64/RIOT,kYc0o/RIOT,OlegHahm/RIOT,miri64/RIOT,basilfx/RIOT,basilfx/RIOT,jasonatran/RIOT,OTAkeys/RIOT