Replaced expensive IOKit function.