How do I compile Core 0.8.6 on Ubuntu (EC2)?
You can use the gitian build system. Instructions for building 0.8.x with gitian are available here: https://github.com/bitcoin/bitcoin/tree/0.8/contrib/gitian-descriptors and here: https://github.com/bitcoin/bitcoin/blob/0.8/doc/release-process.md. Using gitian should get you exactly the same binaries as those that were released.