Add some sanity checks when looking up syscalls.

This may avoid crashing the emu when it starts executing junk (still not good of course, heh).