Return an error code when module load fails.

If we're out of memory, we need to tell the game, of course.