According to the schematic, the Lilypad appears to have the USB power in parallel
with the external voltage input.
You can not switch between them without doing one of three things:
A. Modify the board
B. Chop up a USB cable to use an external voltage source
C. Find a new way to implement the check for out of power
Also, do not connect an external power source to the board while it is plugged into the USB port or it may damage your computer or your power source or both due to voltage differential.
Schematic is here in case you want to view it: http://www.arduino.cc/en/Main/ArduinoBoardLilyPad