Automatically determine size of dispatch table

Use SYSCALL_MAX in enum syscall_id to determine the proper size of the
dispatch table.