Are you sure it's shutting off and not going into some sort of hibernate/sleep mode?
There are settings you can change to determine what the phone will do at a certain battery level, maybe try changing those and see what happens? I'd find out exactly where, but I have to go to work so I don't have time unfortunately, sorry.