code to patch the Synctex file for use with knitr (similar to patchDVI for sweave)