The usage of sysctl is discouraged except in targets. This is because the evaluation of any makevars, such as used during make index, then has to run the command, further slowing down that process.
Usage of sysctl(8) should always be done with the SYSCTL variable, as it contains the fully qualified path and can be overridden, if one has such a special need.