Prevent ICS From Mounting USB Storage
If you enable USB Debugging Mode, the phone will connect to your computer and charge as usual, but you will not get any auto-mounting for the phone storage.



Enable USB Debugging in Android 4.0


Click your device home button;
Tap "Settings";
Scroll your way to "Developer options" and tap it;
Check "USB debugging".




Enable USB Debugging in Android 2.3


Click your device home button;
Tap on "Settings";
Tap on "Applications";
Scroll your way to "Development" and tap it;
Check "USB debugging".



This method works for me to charge my phone without mounting the storage.