Fix building LibVMI with xen-events on old Xen libraries and add static ...

...conversion matrix for flags.

Old xen libs don't define HVMMEM_access_n2rwx (for example the Ubuntu version Travis-CI has) thus failing to build with --enable-xen-events.
I added a range check for safety, though I don't think it would cause any issues as Xen does range check on the input values as well. The worst that would happen is that the user's faulty code segfaults.