Make rbenv installation detection more robust.