tools: Fix segmentation fault in ndnsec-sign-req

Change-Id: I586b7b366b8006723f8e892f8a23939653c73ecc
Refs: #2211