Allan's answer is correct - this is a hardware switch, you can't get the built-in speakers back while that bit is stuck in there.
However, I would like to add a simpler suggestion, since I had this exact same thing happen to me.
Buy an external USB speaker - these can be gotten very cheaply (though perhaps not for the greatest quality).
Just plug in the USB speaker, then go to
System Preferences > Sound > Output and select the speaker there. You may have to redo this every time you restart the computer, but this worked fine for me with no need for additional ports or soundcards.
This also worked for me with a USB headphone jack as well - I used my computer for several months like this with the bit of headphone still stuck in the audio jack.