Add libgcrypt checking when SSL support is enabled

Libgcrypt checking is needed in order to get its compiler and linker
flags.
Add missing libgcrypt compiler and linker flags to the makefile