Various issues

fix lib detection https://bugs.php.net/65539