I don't have a razer mouse currently so I'm not familiar with the software. Your mouse should allow you to reassign the buttons that are not working as keyboard keys. This would allow XIM to see these buttons. The buttons should be assigned to keys that are not normally used in your config like: o p k l n m. After you've assigned the non-working buttons as these keys test the mouse with XIM. If this doesn't work and XIM4's firmware is up to date then unfortunately we are out of options aside from using another mouse or using XIM with your PC while you play, assuming you have a PC close to you.