Use XGetErrorText() instead of our own table

This fixes segfaults when the error code is not in the table