The simplest way to do this is of course a restore.
But if you have a jailbreak iPhone you can access the file system and change the saved flag:
To access the file system, you can use one of the following:
1. Enable the WiFi and access the file system through ssh.
2. Access the file system directly with an installed Terminal app.
Go to: /private/var/preferences/csidata
It should be something like the following:
Notice the last line GsmRadioModule::fInAirplaneMode it's set to 0x1. Change it to 0x0 and reboot the device.
EDIT: I suggest you enable both the WiFi and the Bluetooth (if you're using it) before you change the file. I noticed that the method above might prevent you from enabling those services later on.