You need to provide the library with your Kindle's PID and then use the command line tool kindlefix.py to update the MOBI/PRC ebook file. The PID can be found by using an old version of Windows MobiPocket Reader, or by running another python script. The best source of information is
How to make Igor's script work.