Update Sensor#shouldExecuteOnProject implementation for 3.7 backward compatibility.