Do not break binaries detection with which - fixes #516