Added LD_LIBRARY_PATH fix to check_cert function.