The game has to plan for the extra buttons when it is made, or they won't do anything by default.
I don't think you can open NWN itself and add functionality for those buttons. It's way beyond my paygrade if you can. But you should be able to remap the mouse buttons to something that is useful for NWN, with the caveat that those keys will ALWAYS be whatever you remap them to, or you have to make and use different profiles for different uses.
Remapping keys isn't as straight forward in Windows as it should be, but there are programs that make it easy. Here's a link with one:
http://www.ghacks.net/2012/12/27/remap- ... n-windows/