cmake: added PAM detection script