I'm not sure there is a way to fix the cars without a hardware retrofit if that is even a viable option. Someone on reddit (
https://www.reddit.com/r/business/comments/3ljng2/volkswagen...) suggested the only way they were able to pass emissions was to keep the exhaust gas recirculator (EGR) operational during the test reducing NOx emissions. Keeping the EGR open has a lot of drawbacks and probably isn't a viable long term solution as it results in loss of power in the engine, reduced fuel economy, greater wear on the engine, increased particulate emissions, increased overall operating temperatures. The later drawback would probably require a hardware solution.
A diesel engine with an EGR operating doesn't efficiently burn off all the fuel which, in addition to loss of power, produces greater particulate matter (pm) emissions which intern need to be filtered from the exhaust. The exhaust filters can become clogged with pm soot and the way it's cleansed is by injecting and igniting fuel in the exhaust to burn off the soot. If the EGR was continuously in operation then this burn off process would happen with greater regularity increasing the operating temperature of the exhaust system which would probably require more heat shielding and cooling.
Another option is a selective catalytic reduction (SCR) system. Assuming one could be retro fit on these cars, an SCR would probably have the last impact on the vehicle's operation but would introduce new maintenance concerns for the operator (DEF fluid) and Volkswagen.