how to prevent ios from updating apps to incompatible versions
Sadly, the developer is the one who will have to fix this, and you cannot do anything without jail breaking it and (if you know code) making changes to the firmware.

However, read the release notes and take care to make sure it works on iOS 4. Usually the developer will put something in it about compatibility.