The non-pkg-config case can't use pkg-config to check the version. Also, make sure that the check is properly guarded in the case of missing pkg-config macros.