As noted above in this thread, you can claim the adoption credit for expenses incurred in a failed adoption. You asked whether you can claim this credit for 2005 for a failed 2004 adoption. I say maybe.
The IRS is far from clear as to "when" you can claim the credit for a failed adoption. IRS guidelines determine the timing for taking the credit based on when the adoption becomes "final." However, IRS guidelines also say the adoption does not have to be finalized in order to take the credit if the child is a US citizen or resident, as in your case. The lack of clarity is due to the fact that people can claim the credit even though the adoption is never finalized, but such folks must determine when they can take the credit based on when the adoption becomes final!
I claimed failed adoption expenses I incurred during 2002 on my 2002 tax return. There was no problem. Speaking from experience, I would recommend claiming the credit on your 2004 tax return, not your 2005 return. But due to the lack of clarity, you might have no problem claiming the credit for 2005. If you really want to investigate the rules for when you can take the credit, visit page 3 of this IRS document:
http://www.irs.gov/pub/irs-pdf/p968.pdf