Use correct variable in require()
Use modname instead of the nonexistent name in the error message if
require() is passed the wrong type of parameter.
Bug: 69410
Change-Id: I2e96d283e34a16e4675141ce8ccddbcc045ef2a1
(cherry picked from commit b0de034ffe41f5c2db61a21d394c1995442fe6f4)