Stop using require() directly in corelib (it might not exist)