improved agar detection when agar-config is not present