Check for Poco/SharedLibrary.h instead of arbitrary AbstractCache.h

SharedLibrary.h is included in the code, so it makes sense
to check for this header specifically.