[cmake] Compute PYTHONLIBS_VERSION_STRING only if patchlevel.h is found

Fix the weird cmake message error when PYTHON_INCLUDE_DIR is not found
for the desired python version.