It is not because of the old OS. Indeed, there are people who have this problem who believe it is because they upgraded to the newest OS (it isn't). Your battery may be failing, or the battery gauge may be reading incorrectly. You can contact Apple support or visit an Apple store and they can test your battery (even over the phone), or you can get the app Battery Life and test it yourself (Apple's test is more comprehensive).
You can also try to recalibrate the battery gauge:
- Charge to 100%
- Run the battery down until the phone shuts off
- If it shuts off above 1% charge it for a minute only, then continue running the battery down. Repeat until it makes it to 1% before shutting off
- Charge it to 100% again
- Repeating the above steps a 2nd time is sometimes recommended.