nanomsg: enable optional debug build

Considering alpha stage of this library ability to build with debug
symbols is useful.

Closes #22974.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>